package com.iqianye.lacus17c_consumer_feign.controller;

import com.iqianye.lacus17c_consumer_feign.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author mageric
 * @version 1.0.0
 * @date 2022/4/25 12:46
 */
@RestController
public class NacosConsumerController {
    @Autowired
    private FeignService service;

    @Value("${spring.application.name}")
    private String appName;

    @GetMapping("/test/app/name")
    public String test() {
        return service.test(appName);
    }
}
